from ciallo_ui.parameter_manager import *
import time
class Demo:
    def __init__(self):
        self.name = RadioField('Name','John', ['John', 'Jane', 'Doe'])
        self.age = IntField('Age', default_value=20, min=0, max=100, step=1)
        self.is_boy = BoolField('Is boy', default_value=True)
if __name__ == '__main__':

    a = Demo()
    ParameterManager.add_parameter(a, "Demo")
    ParameterManager.run_in_thread()

    while True:
        for name, parameter in a.__dict__.items():
                if isinstance(parameter, UIField):
                    print(name, parameter.value)
        time.sleep(2)